#define _CRT_SECURE_NO_WARNINGS


#include"string.h"

int main()
{
	/*my::string s1;
	cout << s1.c_str() << endl;
	
	my::string s2("hello world");
	cout << s2.c_str() << endl;
	cout << s2.size()<<endl;

	s2[0] = 'x';
	cout << s2.c_str() << endl;

	for (size_t i = 0; i < s2.size(); i++)
	{
		cout << s2[i] << " " ;
	}
	cout << endl;

	my::string::iterator it1 = s2.begin();
	while (it1 != s2.end())
	{
		(*it1)--;
		it1++;
	}
	for (size_t i = 0; i < s2.size(); i++)
	{
		cout << s2[i] << " ";
	}
	cout << endl;
	for (auto& ch : s2)
	{
		ch++;
	}
	for (auto ch: s2)
	{
		cout << ch << " ";
		
	}
	cout << endl;*/

	/*my::string s3("abc");
	s3.push_back('r');
	my::string::iterator it2 = s3.begin();
	for (auto ch : s3)
	{
		cout << ch << " ";
	}
	cout << endl;*/

	/*my::string s4("abc");
	s4 += "abc";
	for (auto ch : s4)
	{
		cout << ch << " ";
	}
	cout << endl;*/

	/*my::string s5("hello world");
	s5.insert(6,'x');
	for (auto ch : s5)
	{
		cout << ch << " ";
	}
	cout << endl;*/

	/*my::string s6("abc abc");
	s6.insert(4, "abc ");
	for (auto ch : s6)
	{
		cout << ch << " ";
	}
	cout << endl;*/
	/*my::string s7("abc abc");
	s7.erase(4, 2);
	for (auto ch : s7)
	{
		cout << ch << " ";
	}
	cout << endl;*/

	my::string s8("abc abc");
	
	cout << s8.find(' ') << endl;
	cout << s8.find("bc") <<endl;
	cout << endl;

	return 0;
}